﻿@model Super.Entities.Message
@using Super.Common.Validate
@using Super.DomainService
@{
    ViewBag.Title = "发送站内信";
    Layout = "~/Areas/Admin/Views/Shared/_JboxLayout.cshtml";
    <script type="text/javascript" src="/Assets/Plus/xheditor/xheditor.js"></script>
    <script type="text/javascript" src="/Assets/Plus/xheditor/xheditor_plugins/ubb.min.js"></script>
}
<div class="content" style="width: 700px; height: 440px">
    <div class="right" style="width: 700px;">
        <div class="h_con_01 setting">
            <fieldset>
                <legend>发送站内信</legend>
                <br />
            </fieldset>
            <div>
                <form method="post" action="" id="superform">
                <input type="hidden" value="" id="userGs" name="userGs" />
                <div class="h_form">
                    <div class="setting domain-setting" style="width: 860px">
                        <fieldset>
                            @*<legend>批量站内信发送</legend><br />*@
                            <div id="num_01" style="display: block;" class="settingrow">
                                <div class="detail">
                                    <div class="desc">
                                        <div class="task">
                                            <div class="input">
                                                <label class="title">标题：</label> <input id="userId" name="userId" type="hidden" value="@ViewBag.userId"/>
                                                @Html.TextBoxFor(m => m.Title, new { @class = "input_01", style = "width:486px;padding-left: 1px;", maxlength = "60" }).Validate().Maxlength(60).ToHtml()
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div id="num_02" style="display: block;" class="settingrow">
                                <div class="detail">
                                    <div class="desc">
                                        <div class="task">
                                            <div class="input">
                                                <label class="title">站内信内容：</label>
                                                @Html.TextAreaFor(m => m.Detail, new { @class = "input_01", style = " width:536px;height:188px;max-width:536px;min-width:536px;" })
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="action" style="margin-top: 40px;">
                                <button type="submit" class="button primary" name="save">发送</button>
                                <button type="reset" class="button">重填</button>
                            </div>
                        </fieldset>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(pageInit);
    function pageInit() {
        $.extend(xheditor.settings, { shortcuts: { 'ctrl+enter': submitForm} });
        $('#Detail').xheditor({ tools: 'simple', upLinkUrl: "!{editorRoot}xheditor_plugins/multiupload/multiupload.html?uploadurl=/Upload/Index?key=@SuperService.LoginUser.UserID&immediate=1&ext=附件文件(*.zip;*.rar;*.txt)&params=1", upImgUrl: '!{editorRoot}xheditor_plugins/multiupload/multiupload.html?uploadurl=/Upload/Index?key=@SuperService.LoginUser.UserID&immediate=1&ext=图片文件(*.jpg;*.jpeg;*.gif;*.png)' });

    }
    function insertUpload(arrMsg) {
        var i, msg;
        for (i = 0; i < arrMsg.length; i++) {
            msg = arrMsg[i];
            $("#uploadList").append('<option value="' + msg.id + '">' + msg.localname + '</option>');
        }
    }
    function submitForm() { $('form').submit(); }
    
</script>
